package com.zg.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zg.dao.TagToGoodsMapper;
import com.zg.pojo.TagToGoods;
import com.zg.service.TagToGoodsService;

@Service("tagToGoodsService")
public class TagToGoodsServiceImpl implements TagToGoodsService{

	@Resource
	private TagToGoodsMapper tagToGoodsDao;
	
	@Override
	public TagToGoods tagToGoodsListById(int id) {
		return this.tagToGoodsListById(id);
	}

	@Override
	public int insert(TagToGoods record) {
		return this.tagToGoodsDao.insert(record);
	}

	@Override
	public int updateByPrimaryKey(TagToGoods record) {
		return this.tagToGoodsDao.updateByPrimaryKey(record);
	}

	@Override
	public int deleteByPrimaryKey(TagToGoods record) {
		return this.tagToGoodsDao.updateByPrimaryKey(record);
	}

	@Override
	public TagToGoods selectTagToGoodsByTagAndGoods(int goodsId, int tagId) {
		return this.tagToGoodsDao.selectByTagAndGoods(goodsId, tagId);
	}

	@Override
	public int deleteTagToGoodsByTagAndGoods(int goodsId, int tagId) {
		return this.tagToGoodsDao.deleteByTagAndGoods(goodsId, tagId);
	}
	
}
